#include "cell_main.h"

#include <QApplication>
#include "dlg_login.h"
#include "lib/sqlmgr.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    //初始化数据库
    SqlMgr::getInstance()->init();
    //qDebug() << "login:" << SqlMgr::getInstance()->login("shr", "123456");
    // SqlMgr::getInstance()->getUser();

    Dlg_login dlg; //定义登录界面对象
    int ret = dlg.exec();
    if(ret == 1) {
        Cell_Main w;
        w.show();
        return a.exec();
    } //退出
    else if(ret == 0) {
        exit(0);
        return 0;
    } else {}

    return 0;
}
